<template>
  <div class="item-container">
    <div class="item" >
      <img src="../images/icon-1.png"  class="icon" />
      <div class="description">
        <span class="txt">超6个月末结案</span>
        <span class="num">{{ datainfo.six_month}}</span>
      </div>
    </div>
    <div class="item">
      <img src="../images/icon-2.png"  class="icon" />
      <div class="description">
        <span class="txt">超9个月末结案</span>
        <span class="num">{{ datainfo.nine_month}}</span>
      </div>
    </div>
    <div class="item">
      <img src="../images/icon-3.png"  class="icon" />
      <div class="description">
        <span class="txt">超12个月末结案</span>
        <span class="num">{{datainfo.twelve_month}}</span>
      </div>
    </div>
  </div>
</template>

<script setup>
import { onMounted, ref } from "vue";
import { getDepartCqwj } from '@/api/bmfx.js'
import { getDate } from '@/utils/index.js'

const { getYearStartDate } = getDate()
const datainfo = ref([]);
const queryCqwj = () => {
  const params = {
    jztime: getYearStartDate(),
  }
  getDepartCqwj(params).then(res => {
    datainfo.value = res.data.data[0]
  })
}


onMounted(() => {
  queryCqwj()
})
</script>

<style lang="scss" scoped>
.item-container {
  height: calc(100% - 40px);
  display: flex;
  justify-content: space-around;
}
.item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  .description {
    width: 162px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    background: url("../images/weijie.png") no-repeat;
    background-size: 100% auto;
    .txt {
      color: #fff;
      font-weight: bold;
      font-size: 14px;
      padding: 12px 0;
    }
  }
  .icon {
    width: 90px;
    height: 90px;
    margin-bottom: 12px;
  }
}
.num {
  font-family: DIN, DIN;
  font-weight: bold;
  font-size: 36px;
  color: #44f2ff;
  position: relative;
  margin-top: 10px;
  &::after {
    content: "件";
    position: absolute;
    top: 0;
    bottom: 0;
    right: -20px;
    font-size: 16px;
    color: #44f2ff;
    line-height: 3.5;
  }
}
</style>